package com.zc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.zc.domain.Item;

@Repository
public interface IPowerDao {
	@Select("SELECT TimeStamp,GL FROM ${tableName} ORDER BY TimeStamp DESC LIMIT 1;")
	@Results({
		@Result(column = "TimeStamp",property = "timeStamp"),
		@Result(column = "GL",property = "data")
	})
	List<Item> getPower(@Param("tableName") String tableName);
}
